import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    civilCode: '',
    groupType: 'day'
  },
  mutations: {
    setCivilCode(state, arg) {
      state.civilCode = arg
    },
    setGroupType(state, arg) {
      state.groupType = arg
    }
  },
  actions: {
  },
  modules: {
  },
  getters: {
    getmapPath: state => {
      return '/map/' + state.civilCode + '.geoJson'
    },
    getGroupType: state => {
      return state.groupType
    },
    getCivilCode: state => {
      return state.civilCode
    }

  }
})
